interface Api {
  request?: Object
  response?: Object
}

export interface Banner {
  image: string
  id: number
  link: string
  small_image: string
  h5_image: string

  /**
   * 1:asdasd 2:asd 3:游戏链接
   */
  link_type: 1 | 2 | 3
}

/**
 * 轮播图 轮播图位置:1=主页轮播，2=主页推广，3=主页推广2，4=主页推广3，5=主页推广4,6=推广系统banner，7=vipbanner,8=个人banner,9=洗码banner,10=赌场banner
 */
export interface GetBannerApi extends Api {
  request: {
    position: 'home_banner' | 'promotion_banner' | 'vip_banner' | 'person_banner' | 'rabate_banner' | 'casino_banner'
  }
  response: Array<Banner>
}

export interface LoginParams {
  username: string
  password: string
  code: string
  source: string
  code_value: string
}
export interface LoginData {
  token: string
}

export interface UserInfo {
  id: number | null
  uuid: number | null
  username: string
  money: string
  portrait: string
  user_group_id: number | null
  user_nick: string
  email: string | null
  mobile?: any
  qq: string
  weixin?: any
  skype?: any
  telegram: string
  whatsapp: string
  strong_box_amount: string | null
  strong_box_status: number | null
  level: number | null
  box_status: number | null
  box_pwd: number | null
  withdraw_pwd_status: number | null
  google_auth_status: number | null
}

export interface GetUserInfoApi extends Api {
  response: UserInfo
}

export type ServerApiOptions = {
  cacheTime: number
}
